// Add FIPS codes for TN counties
// source: https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697
gen fcounty=.
replace fcounty=1 if county=="ANDERSON" & state=="Tennessee"
replace fcounty=3 if county=="BEDFORD" & state=="Tennessee"
replace fcounty=5 if county=="BENTON" & state=="Tennessee"
replace fcounty=7 if county=="BLEDSOE" & state=="Tennessee"
replace fcounty=9 if county=="BLOUNT" & state=="Tennessee"
replace fcounty=11 if county=="BRADLEY" & state=="Tennessee"
replace fcounty=13 if county=="CAMPBELL" & state=="Tennessee"
replace fcounty=15 if county=="CANNON" & state=="Tennessee"
replace fcounty=17 if county=="CARROLL" & state=="Tennessee"
replace fcounty=19 if county=="CARTER" & state=="Tennessee"
replace fcounty=21 if county=="CHEATHAM" & state=="Tennessee"
replace fcounty=23 if county=="CHESTER" & state=="Tennessee"
replace fcounty=25 if county=="CLAIBORNE" & state=="Tennessee"
replace fcounty=27 if county=="CLAY" & state=="Tennessee"
replace fcounty=29 if county=="COCKE" & state=="Tennessee"
replace fcounty=31 if county=="COFFEE" & state=="Tennessee"
replace fcounty=33 if county=="CROCKETT" & state=="Tennessee"
replace fcounty=35 if county=="CUMBERLAND" & state=="Tennessee"
replace fcounty=37 if county=="DAVIDSON" & state=="Tennessee"
replace fcounty=39 if county=="DECATUR" & state=="Tennessee"
replace fcounty=41 if county=="DEKALB" & state=="Tennessee"
replace fcounty=43 if county=="DICKSON" & state=="Tennessee"
replace fcounty=45 if county=="DYER" & state=="Tennessee"
replace fcounty=47 if county=="FAYETTE" & state=="Tennessee"
replace fcounty=49 if county=="FENTRESS" & state=="Tennessee"
replace fcounty=51 if county=="FRANKLIN" & state=="Tennessee"
replace fcounty=53 if county=="GIBSON" & state=="Tennessee"
replace fcounty=55 if county=="GILES" & state=="Tennessee"
replace fcounty=57 if county=="GRAINGER" & state=="Tennessee"
replace fcounty=59 if county=="GREENE" & state=="Tennessee"
replace fcounty=61 if county=="GRUNDY" & state=="Tennessee"
replace fcounty=63 if county=="HAMBLEN" & state=="Tennessee"
replace fcounty=65 if county=="HAMILTON" & state=="Tennessee"
replace fcounty=67 if county=="HANCOCK" & state=="Tennessee"
replace fcounty=69 if county=="HARDEMAN" & state=="Tennessee"
replace fcounty=71 if county=="HARDIN" & state=="Tennessee"
replace fcounty=73 if county=="HAWKINS" & state=="Tennessee"
replace fcounty=75 if county=="HAYWOOD" & state=="Tennessee"
replace fcounty=77 if county=="HENDERSON" & state=="Tennessee"
replace fcounty=79 if county=="HENRY" & state=="Tennessee"
replace fcounty=81 if county=="HICKMAN" & state=="Tennessee"
replace fcounty=83 if county=="HOUSTON" & state=="Tennessee"
replace fcounty=85 if county=="HUMPHREYS" & state=="Tennessee"
replace fcounty=87 if county=="JACKSON" & state=="Tennessee"
replace fcounty=89 if county=="JEFFERSON" & state=="Tennessee"
replace fcounty=91 if county=="JOHNSON" & state=="Tennessee"
replace fcounty=93 if county=="KNOX" & state=="Tennessee"
replace fcounty=95 if county=="LAKE" & state=="Tennessee"
replace fcounty=97 if county=="LAUDERDALE" & state=="Tennessee"
replace fcounty=99 if county=="LAWRENCE" & state=="Tennessee"
replace fcounty=101 if county=="LEWIS" & state=="Tennessee"
replace fcounty=103 if county=="LINCOLN" & state=="Tennessee"
replace fcounty=105 if county=="LOUDON" & state=="Tennessee"
replace fcounty=107 if county=="MCMINN" & state=="Tennessee"
replace fcounty=109 if county=="MCNAIRY" & state=="Tennessee"
replace fcounty=111 if county=="MACON" & state=="Tennessee"
replace fcounty=113 if county=="MADISON" & state=="Tennessee"
replace fcounty=115 if county=="MARION" & state=="Tennessee"
replace fcounty=117 if county=="MARSHALL" & state=="Tennessee"
replace fcounty=119 if county=="MAURY" & state=="Tennessee"
replace fcounty=121 if county=="MEIGS" & state=="Tennessee"
replace fcounty=123 if county=="MONROE" & state=="Tennessee"
replace fcounty=125 if county=="MONTGOMERY" & state=="Tennessee"
replace fcounty=127 if county=="MOORE" & state=="Tennessee"
replace fcounty=129 if county=="MORGAN" & state=="Tennessee"
replace fcounty=131 if county=="OBION" & state=="Tennessee"
replace fcounty=133 if county=="OVERTON" & state=="Tennessee"
replace fcounty=135 if county=="PERRY" & state=="Tennessee"
replace fcounty=137 if county=="PICKETT" & state=="Tennessee"
replace fcounty=139 if county=="POLK" & state=="Tennessee"
replace fcounty=141 if county=="PUTNAM" & state=="Tennessee"
replace fcounty=143 if county=="RHEA" & state=="Tennessee"
replace fcounty=145 if county=="ROANE" & state=="Tennessee"
replace fcounty=147 if county=="ROBERTSON" & state=="Tennessee"
replace fcounty=149 if county=="RUTHERFORD" & state=="Tennessee"
replace fcounty=151 if county=="SCOTT" & state=="Tennessee"
replace fcounty=153 if county=="SEQUATCHIE" & state=="Tennessee"
replace fcounty=155 if county=="SEVIER" & state=="Tennessee"
replace fcounty=157 if county=="SHELBY" & state=="Tennessee"
replace fcounty=159 if county=="SMITH" & state=="Tennessee"
replace fcounty=161 if county=="STEWART" & state=="Tennessee"
replace fcounty=163 if county=="SULLIVAN" & state=="Tennessee"
replace fcounty=165 if county=="SUMNER" & state=="Tennessee"
replace fcounty=167 if county=="TIPTON" & state=="Tennessee"
replace fcounty=169 if county=="TROUSDALE" & state=="Tennessee"
replace fcounty=171 if county=="UNICOI" & state=="Tennessee"
replace fcounty=173 if county=="UNION" & state=="Tennessee"
replace fcounty=175 if county=="VAN BUREN" & state=="Tennessee"
replace fcounty=177 if county=="WARREN" & state=="Tennessee"
replace fcounty=179 if county=="WASHINGTON" & state=="Tennessee"
replace fcounty=181 if county=="WAYNE" & state=="Tennessee"
replace fcounty=183 if county=="WEAKLEY" & state=="Tennessee"
replace fcounty=185 if county=="WHITE" & state=="Tennessee"
replace fcounty=187 if county=="WILLIAMSON" & state=="Tennessee"
replace fcounty=189 if county=="WILSON" & state=="Tennessee"
